package dht.message;

import java.io.Serializable;
import java.net.InetAddress;

import dht.data.DhtData;
import dht.data.TabBigInteger;

public class GetMessage extends Message implements Serializable {

	private static final long serialVersionUID = -6745794884657839203L;

	private DhtData<Integer> reply=null;
	
	public GetMessage(InetAddress adresseIpClient, String virtualId,
			          TabBigInteger destination) {
		super(adresseIpClient, virtualId, destination);
		this.TYPE_MSG=GET_Message;
	}
	public GetMessage GetReply(InetAddress adresseIpClient, String virtualId,
	          TabBigInteger destination) {
			GetMessage g= new GetMessage(adresseIpClient, virtualId, destination);
			g.TYPE_MSG=REPLY_Message;
			return g;
	
	}
	
	/**
	 * Getter
	 * @return la donnée de la réponse
	 */
	public DhtData<Integer> getReply() {
		return reply;
	}
	
	/**
	 * Setter
	 * @param d La donnée de retour
	 */
	public void setReply(DhtData<Integer> d) {
	 	reply=d;
	}
}
